package com.qhs.framework.base;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;

/**
 * 基础模型
 *
 */
@Entity
@Inheritance(strategy = InheritanceType.TABLE_PER_CLASS)
public class BaseModel implements Serializable {
    /**
     * 活跃的，及没有删除的记录
     */
    public static final Integer ACTIVE_FLAG_YES = 1;

    /**
     * 不活跃的，及删除的记录
     */
    public static final Integer ACTIVE_FLAG_NO = 0;

    /**
     * 主键
     */
    @Id
    @Column(name = "id",length = 19)
    protected Long id;

    /**
     * 删除标识
     */
    @Column(name = "active_flag")
    protected Integer activeFlag;

    /**
     * 创建人
     */
    @Column(name = "create_by")
    protected Long createBy;

    /**
     * 创建时间 - 时间戳
     */
    @Column(length = 19,name = "create_time")
    protected Long createTime;

    /**
     * 修改人
     */
    @Column(name = "update_by")
    protected Long updateBy;

    /**
     * 更新时间-时间戳
     */
    @Column(length = 19,name = "update_time")
    private Long updateTime;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Integer getActiveFlag() {
        return activeFlag;
    }

    public void setActiveFlag(Integer activeFlag) {
        this.activeFlag = activeFlag;
    }

    public Long getCreateBy() {
        return createBy;
    }

    public void setCreateBy(Long createBy) {
        this.createBy = createBy;
    }

    public Long getUpdateBy() {
        return updateBy;
    }

    public void setUpdateBy(Long updateBy) {
        this.updateBy = updateBy;
    }

    public Long getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Long createTime) {
        this.createTime = createTime;
    }

    public Long getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Long updateTime) {
        this.updateTime = updateTime;
    }

}
